<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="uct" uri="/WEB-INF/uct.tld" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <%@ include file="/common/sale/include/common-base.jsp"%>	
  <title>交易商审核-${titleName}</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<script>
var add_url = "${ctx}/res/uct/admin/saveUser";
var del_url = "${ctx}/res/uct/admin/delUser";
var view_url = "${ctx}/trans/info/userInfo";
//var org_url = "${ctx}/uct/org/org!initOrg.action";
var org_url = "${ctx}/trans/list/orgInit";
var dept_url = "${ctx}/trans/list/deptInit";//?orgId=${item.orgId}
var id;
</script>
<script src="${ctx}/js/uct/date.js"></script>
</head>
<body class="hold-transition ${sysColor} sidebar-mini">
<div class="wrapper">

  <!-- top start -->
  <%@include file="/common/sale/top.jsp" %>
  <!-- top end -->


  <!-- left start -->
  <%@include file="/common/sale/left.jsp" %>
  <!-- left end-->

<div class="content-wrapper">
<!-- 只查询待审核状态的数据 -->

<!-- Main start -->
<section class="content">
	<div class="row">
	<div class="col-xs-12">
	<!--搜索  start -->
    <div class="box box-info">
    	<!--搜索title  start --> 
     	<div class="box-header with-border">
     		<h3 class="box-title"><i class="fa fa-search"></i> 搜索</h3>
            <div class="box-tools pull-right" style="display: none;">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
           	<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
           	</div>
        </div>
      	<!--搜索title  end -->
      	<div class="box-body">
			  <form id="searchFrom" class="form-horizontal">
				<input type="hidden" name="uctUser.w_auditStatus" value="10"/>
				<input type="hidden" name="doCode" value="dymicSql"/>
				<input type="hidden" name="modelTypes" value="s_uctUser"/>
				<input type="hidden" name="uctUser.w_userType" value="customer"/>
				<input type="hidden" name="orderBy"  value="uctUser.create_time desc" />
				<!-- 
				<input type="hidden" name="uctUser.w_sysEname" value="${sysName}"/>  
				 -->
				<c:if test="${loginUser.sysFlag !='1'}">
				   <input type="hidden" name="uctUser.w_orgId" id='searchForm_orgId' value="${loginUser.orgId}"/>
				</c:if>
				<div class="col-sm-11">
				<div class="form-group">
					<div class="col-sm-2 text_r"><label class="control-label">所属机构：</label></div>
					<div class="col-sm-2">
						 <select class="form-control" name="uctUser.w_orgId" id="searchForm_org" onchange="setDeptIdValue('searchForm_deptId',this)"></select>
					</div>
					<div class="col-sm-2 text_r"><label class="control-label">登录账号：</label></div>
					<div class="col-sm-2">
						 <input class="form-control clean" name="uctUser.wl_userEname" id="userEname" value="" type="text">
					</div>
					<div class="col-sm-2 text_r"><label class="control-label">用户名称：</label></div>
					<div class="col-sm-2">
						 <input class="form-control clean" name="uctUser.wl_userCname" id="userCname" value="" type="text">
					</div>
				</div>
				<center>
				   <div class="box-footer clearfix">
				       <button type="button" class="btn btn-success" onclick="getTableData();"><i class="fa fa-search"></i> 查询</button>&nbsp;
				       <button type="button" class="btn btn-warning" onclick="cleanData('searchFrom');">重置 </button>
				   </div>
				</center>
			  </div>
			  </form>
            </div>
	  </div>
	  <!-- 搜索 end -->
	  
	  <div class="box box-success">
	  <!--搜索title  start -->
	  	<div class="box-header with-border">
         	<h3 class="box-title"><i class="fa fa-user"></i> 会员审核列表 </h3>
        </div>
        <!--搜索title  end --> 
        <div class="box-body">
        	<table id="example" class="table table-bordered table-hover" >
	            <thead class="bg-success">
	            	<tr>
	                  <th>序号</th>
	                  <th>登录账号</th>
	                  <th>用户名称</th>
	                  <th>所属机构</th>
	                  <th>所属部门</th>
	                  <!-- <th>用户类型</th> -->
	                  <th>性别</th>
	                  <th>手机</th>
	                  <th>注册时间</th>
	                  <th>注册来源</th>
	                  <th>状态</th>
	                  <th>操作</th>
	                </tr>
	             </thead>
	             <tbody id="myList">
	             </tbody>
             </table>
             <center>
  	  		 	<ul id="pageList"></ul>
	  		 </center>
  		 </div>
        </div>
      
        <div class="ibox">
        	<!-- 
        	<div class="box-header with-border">
	           	<div role="toolbar" class="btn-toolbar">
			    	<div class="btn-group">
				        <button  onclick="toAddOrg();" class="btn btn-success" type="button"><i class="fa fa-plus-circle"></i> 增加会员 </button>
		         	</div>
				</div>
          	</div>
           -->
          <!-- /.box-header -->
        </div>
      </div>
    </div>
   </section>
   <!-- Main end -->
</div>
<!-- /.content-wrapper -->
<!-- foot start -->
<%@include file="/common/sale/foot.jsp" %>
<!-- foot start -->
  
<div class="modal fade " id="my_modal" tabindex="-1" data-backdrop="static" data-keyboard="false" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width: 900px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true" >
					&times;
				</button>
				<h4 class="modal-title">
					<font color="red">&nbsp;&nbsp;&nbsp;&nbsp;交易商审核</font>&nbsp;
				</h4>
			</div>
			<div class="modal-body" id="orgFormData">
				<form id="auditFrom" name="auditFrom" class="container" style="width:100%">
					<input type="hidden" id="userId" data-name="userId" class="clean" value=""/>
					<div class="row"  style="margin-left: 20px;">
						<div class="form-group col-sm-6">
							<label class="control-label col-sm-4">登录账号：</label>
							<div class="col-sm-8">
								<span data-name="userEname"></span>
							</div>
						</div>
						<div class="form-group col-sm-6">
							<label class="control-label col-sm-4">用户名称：</label>
							<div class="col-sm-8">
								<span data-name="userCname"></span>
							</div>
						</div>
					</div>
					 
					<div class="row"  style="margin-left: 20px;">
						<div class="form-group col-sm-6">
							<label class="control-label col-sm-4">公司名称：</label>
							<div class="col-sm-8">
								<span data-name="company"></span>
							</div>
						</div>
						
						<div class="form-group col-sm-6">
							<label class="control-label col-sm-4">手机：</label>
							<div class="col-sm-8">
								<span data-name="mobile"></span>
							</div>
						</div>
					</div>
					
					<!-- ORG INFORMATION START!!! -->
				  	<div id="_org">
				  		<div class="row"  style="margin-left: 20px;">
							<div class="form-group col-sm-6">
								<label class="control-label col-sm-4">注册地：</label>
								<div class="col-sm-8">
									<span data-name="address"></span>
								</div>
							</div>
							<div class="form-group col-sm-6 ">
								<label class="control-label col-sm-4">注册资本：</label>
								<div class="col-sm-8">
									<span data-name="regCapital"></span>（元）
								</div>
							</div>
						</div>
						<div class="row"  style="margin-left: 20px;">
							<div class="form-group col-sm-6">
								<label class="control-label col-sm-4">成立时间：</label>
								<div class="col-sm-8">
									<span data-name="regTime"></span>
								</div>
							</div>
							<div class="form-group col-sm-6 ">
								<label class="control-label col-sm-4">法人代表：</label>
								<div class="col-sm-8">
									<span data-name="legalPerson"></span>
								</div>
							</div>
						</div>
						<div class="row"  style="margin-left: 20px;">
							<div class="form-group col-sm-6">
								<label class="control-label col-sm-4">所属行业：</label>
								<div class="col-sm-8">
									<span data-name="strFiftyThree" data-dict="Industrycode"></span>
								</div>
							</div>
							<div class="form-group col-sm-6 ">
								<label class="control-label col-sm-4">企业类型：</label>
								<div class="col-sm-8">
									<span data-name="enterpriseType" data-dict="buyerjjlx" ></span>
								</div>
							</div>
						</div>
						<div class="row"  style="margin-left: 20px;">
							<div class="form-group col-sm-6">
								<label class="control-label col-sm-4">组织机构代码：</label>
								<div class="col-sm-8">
									<span data-name="orgCode"></span>
								</div>
							</div>
						</div>
					  	<div class="row"  style="margin-left: 20px;">
						  	<div class="form-group col-sm-6">
								<label class="control-label col-sm-4">经营范围：</label>
								<div class="col-sm-8">
									<span data-name="strFiftyOne"></span>
								</div>
							</div>
					  	</div>
					  	<div class="row"  style="margin-left: 20px;">
						  	<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件1：交易参与人（企业）资格申请表：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredFour">下载</a>
								</div>
							</div>
					  	</div>
					  	<div class="row"  style="margin-left: 20px;">
						  	<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件2：企业组织机构（或三证合一）扫描件：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredFive">查看</a>
								</div>
							</div>
					  	</div>
					  	<div class="row"  style="margin-left: 20px;">
						  	<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件3：交易代表推荐函：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredSix">下载</a>
								</div>
							</div>
					  	</div>
					  	<div class="row"  style="margin-left: 20px;">
						  	<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件4：交易代表身份证复印件正面照：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredTwo">查看</a>
								</div>
							</div>
					  	</div>
					  	<div class="row"  style="margin-left: 20px;">
						  	<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件5：交易代表身份证复印件反面照：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredThree">查看</a>
								</div>
							</div>
					  	</div>
					  	<div class="row"  style="margin-left: 20px;">
						  	<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件6：《入场交易协议书》（签字盖章）：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredSeven">下载</a>
								</div>
							</div>
					  	</div>
					  	<div class="row"  style="margin-left: 20px;">
						  	<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件7：《风险提示函》（签字盖章）：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredEight">下载</a>
								</div>
							</div>
					  	</div>
				  	</div>
				  	<!-- ORG INFORMATION END!!!! -->
				  	<!-- PERSON INFORMATION START!!!! -->
				  	<div id="_person">
				  		<div class="row"  style="margin-left: 20px;">
					  		<div class="form-group col-sm-6 ">
								<label class="control-label col-sm-4">性别：</label>
								<div class="col-sm-8">
									<span data-name="userSex"></span>
								</div>
							</div>
							<div class="form-group col-sm-6">
								<label class="control-label col-sm-4">身份证件号码：</label>
								<div class="col-sm-8">
									<span data-name="certNo"></span>
								</div>
							</div>
						</div>
						<div class="row"  style="margin-left: 20px;">
							<div class="form-group col-sm-6">
								<label class="control-label col-sm-4">职务：</label>
								<div class="col-sm-8">
									<span data-name="strFiftyTwo"></span>
								</div>
							</div>
						</div>
						<div class="row"  style="margin-left: 20px;">
							<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件1：交易参与人（自然人）资格申请表：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredFour">下载</a>
								</div>
							</div>
						</div>
						<div class="row"  style="margin-left: 20px;">
							<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件2：交易参与人（自然人）风险评估问卷：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredFive">下载</a>
								</div>
							</div>
						</div>
						<div class="row"  style="margin-left: 20px;">
							<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件3：身份证复印件正面照：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredTwo">查看</a>
								</div>
							</div>
						</div>
						<div class="row"  style="margin-left: 20px;">
							<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件4：身份证复印件反面照：</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredThree">查看</a>
								</div>
							</div>
						</div>
					  	<div class="row"  style="margin-left: 20px;">
							<div class="form-group col-sm-12">
								<label class="control-label col-sm-8">附件5：近期个人金融资产证明材料扫描件:</label>
								<div class="col-sm-4">
									<a target="_blank" data-name="strHundredSix">查看</a>
								</div>
							</div>
						</div>
				  	</div>
				  	<!-- PERSON INFOMATION END!!!!! -->
					<div class="row"  style="margin-left: 20px;">
						<div class="form-group col-sm-12">
							<label class="control-label col-sm-2">审核意见：</label>
							<div class="col-sm-8">
								<textarea class="form-control clean" id="auditOptinion"></textarea>
							</div>
						</div>
					</div>
					<div class="row form-group col-sm-12">
				        <center>
							<button type="button" class="btn btn-danger" onclick="submitAudit('90')"> 审核不通过 </button>  
			           		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						 	<button type="button" class="btn btn-success" onclick="submitAudit('91')"> 审 核 通 过 </button>
				        </center>
			        </div>
	         	</form>
	         	<!-- 消息推送NoticeForm开始 -->
	         	<form class="form-horizontal" role="form" id="auditInfoForm">
					<input type="hidden" name="trpNotice.delStatus" value="F">
	               <input type="hidden" name="trpNotice.noticeId" id="noticeId" value="">
	               <input type="hidden" name="trpNotice.createUser" id="createUser" value="">
	               <input type="hidden" name="trpNotice.createTime" id="createTime" value="">
	               <input type="hidden" name="trpNotice.bussCode" id="bussCode" value="">
	               <input type="hidden" name="trpNotice.bussRemark" id="bussRemark" value="">
	               <input type="hidden" name="trpNotice.sendCount" id="sendCount" value="">
	               <input type="hidden" name="trpNotice.bussId" id="bussId" value="">
	               <input type="hidden" name="trpNotice.bussMethodName" id="bussMethodName" value="">
	               <input type="hidden" name="trpNotice.bussTableName" id="bussTableName" value="">
	               <input type="hidden" name="trpNotice.lastTime" id="lastTime" value="">
	               <input type="hidden" name="trpNotice.delStatus" id="delStatus" value="0">
					<input type="hidden" id="formToken" name="formToken" >
					<input type="hidden" id="noticeTitle" name="trpNotice.noticeTitle" value="账号信息审核"/>
					<input type="hidden" id="noticeContent" name="trpNotice.noticeContent" value=""/>
					<input type="hidden" id="notice_userEname" name="trpNotice.userEname"/><!-- 接收人 -->
					<input type="hidden" id="typeName" name="trpNotice.typeName" value="mail"/><!-- 消息类型，站内信 -->
					<input type="hidden" id="noticeStatus" name="trpNotice.noticeStatus" value="1" /><!-- 发送状态：未发送 -->
				</form>
	         	<!-- 消息推送NoticeForm结束 -->
         </div>
      </div>
		<!-- /.modal-content -->
	</div>		
</div>
</body>
	
<script type="text/template" id="dataList">
	<? for ( var i = 0; i < rows.length; i++) {?>
				<tr>
					<td style="display:none;"><?=rows[i].userId?></td>
					<td><?=(pageObj.currentPage-1)*10+(i+1) ?></td>
					<td><?=rows[i].userEname?></td>
					<td><?=strUtil.subStr(rows[i].userCname,7)?></td>
					<td><?=getOrgCname(rows[i].orgEname)?></td>
					<td><?=rows[i].deptName?></td>
					<!--<td><?=rows[i].userType?></td>-->
					<?if(rows[i].userSex=='F'){?>
						<td>女</td>
					<?}else if(rows[i].userSex=='M'){?>
						<td>男</td>
					<?} else{?>
						<td>--</td>
					<?}?>
					<td><?=rows[i].mobile?></td>
					<td><?=getFormatDateByLong(rows[i].createTime)?></td>
					<!--<td><?=strUtil.doNull(rows[i].createTime)?>时间方法问题</td>-->
					<td><?=rows[i].regSource?></td>
					<?if(rows[i].userStatus=='1'){?>
						<td>启用</td>
					<?}else{?>
						<td>停用</td>
					<?}?>
					<td>
						<button type="button" class="btn btn-warning btn-xs" onclick="toAudit('<?=rows[i].userId?>');"><i class="fa fa-cog"></i> 审核</button>
					</td>
				</tr>
     		<?}?>
</script>

<script>
var clickMenu= 'trader-audit-list';
var userId;
$(function () {
	$("#_org").hide();
	$("#_person").hide();
	initOrg("searchForm_org");
	getTableData();
});
function getTableData(){
	deleteAllRow('example');
	$("#act-userId").val(id);
	$.ajax({
		type:'get',
		url:common_list_url,
	    data:$('#searchFrom').serialize()+getCurrentPage(common_list_url+"?"+$('#searchFrom').serialize(),10),
	    dataType:'json',
	    success: function(myData){
			var data = baidu.template('dataList',eval(myData));  
			$("#myList").html(data);
			var option= {
				ele:$("#pageList")[0],
				total:myData.total,
				fn:getTableData,
				url:common_list_url+"?"+$('#searchFrom').serialize()
			}
			generatePages(option);
		}
	});	
}

//设置模态框隐藏事件钩子  
$( '#my_modal' ).on( 'hide.bs.modal' ,function(e){  
	cleanData('orgFormData');
	window.location.reload();
}); 

function cleanData(id){
<%--	$(':input','#'+id)  --%>
<%--	 .not(':button, :submit, :reset, :hidden')  --%>
<%--	 .val('')  --%>
<%--	 .removeAttr('selected'); --%>
$('#'+id).find(".clean").val("");//按照样式清空；

}

//设置模态框隐藏事件钩子  
$( '#my_modal' ).on( 'show.bs.modal' ,function(e){  
	$.ajax({
	    type:'get',
	    url:'${ctx}/sendPage/token?token=true',
	    dataType:'json',
	    success: function(myData){
			$('#formToken').val(myData);
	  	}
	});	
}); 


function cannel(){
	$('#my_modal').modal('hide');
}

function refresh(){
	getTableData();
}

function setToken(){
	$.ajax({
	    type:'get',
	    url:'${ctx}/sendPage/token?token=true',
	    dataType:'text',
	    success: function(myData){
	    	console.log(myData);
			 $('#formToken').val(myData);
	  	}
	});	
}
function initOrg(selectId){
	$("#"+selectId).html("");
	if("orgId"==selectId)$("#"+selectId).append("<option value=''>--请选择--</option>");
	$.ajax({url: org_url+'?orgIds=${loginUser.dataOrgIds }${loginUser.orgId }',  async:false,
        type: "get",dataType: "text",
        success: function(data){
        	if(data){
	        	var obj = $.parseJSON(data);
	        	var selected="";
				for(var i = 0; i < obj.length; i++){
					if(obj[i].orgId=="${loginUser.orgId }" && "orgId"!=selectId)selected="selected=selected"
					$("#"+selectId).append("<option value='"+obj[i].orgId+"' "+selected+">"+obj[i].orgCname+"</option>");
				}
        	}
        }
    });
}

function toAudit(userId){
	userId=userId;
	//cleanData("auditFrom");
	//$("#auditFrom").find("a").attr("href","");
	$("#my_modal").modal("show");
	$("#auditOptinion").nextAll("span").remove();//清除上次校验记录
	$.ajax({
		url:common_info_url,
		dataType:'json',
		data:{'doCode':'dymicSql','modelTypes':'s_uctUser','uctUser.w_userId':userId},
		type:'get',
		success:function(myData){
			FormUtil.loadView("", myData);
			var customerType = myData.customerType;
			if("person"==customerType){
				$("#_person").show();
				$("#_org").hide();
			}
			if("org"==customerType){
				$("#_person").hide();
				$("#_org").show();
			}
			if(myData.userSex=="M"){
				$("span[data-name='userSex']").text("");
				$("span[data-name='userSex']").text("男");
			}else{
				$("span[data-name='userSex']").text("");
				$("span[data-name='userSex']").text("女");
			}
		}
	});
	$.ajax({
		url:common_info_url,
		dataType:'json',
		data:{'doCode':'dymicSql','modelTypes':'s_member','member.w_memberId':userId},
		type:'get',
		success:function(myData){
			FormUtil.loadView("", myData);
			var userEname = myData.userEname;
			$("#sendCode").val(userEname);
		}
	});
}
var auditStatus;
function submitAudit(status){
	auditStatus = status;
	if(status=="90"&&$("#auditOptinion").val().trim()==""){
		if($("#auditOptinion").val().trim()==""){
			$("#auditOptinion").nextAll("span").remove();
			$("#auditOptinion").after("<span style='color:red;'>请输入审核意见</span>");
			return;
		}else{
			$("#noticeContent").val($("#auditOptinion").val());
		}
	}
	$("#notice_userEname").val($("span[data-name='userEname']").text().trim());
	var auditOptinion = $("#auditOptinion").val();
	if("91"==status){
		if(""!=auditOptinion){
			$("#noticeContent").val(auditOptinion);			
		}else{
			$("#noticeContent").val("您的账号信息审核通过！");
		}
	}
	if("90"==status){
		$("#noticeContent").val(auditOptinion);			
	}
	var userStatus = status=="91"?"1":"0";
	$.ajax({
		url:common_submit_url,
		type:"post",
		data:{"doCode":"dymicSql",
			"modelTypes":"u_uctUser",
			"uctUser.w_userId":$("#userId").val(),
			"uctUser.userStatus":userStatus,
			"uctUser.auditStatus":status,
			"uctUser.auditText":$("#noticeContent").val()},
		dataType:'json',
		success:function(myData){
			//submitAuditInfo(status);
			if(status=="90"){
				$.ajax({
					url:del_url,
					type:'post',
					data:{'userId':$("#userId").val()},
					success:function(myData){
						var msg = JSON.parse(myData);
						addNoticeInfo();
						layer.alert(msg.msg,function(){
							window.location.reload();
						});
					}
				});
			}else{
				addNoticeInfo();
				layer.alert(myData.msg,function(){
					window.location.reload();
				});
			}
		}
	});
}
function submitAuditInfo(status){
	$.ajax({
	    type:'post',
	    url:common_submit_url+"?doCode=dymicSql",
	    async:false,
	    data:{
    		modelTypes:'i_pubAudit',
    		'pubAudit.tableName':'t_uctUser',
    		'pubAudit.auditStatus':status,
    		'pubAudit.auditOptinion':$("#auditOptinion").val()},
	    dataType:'json',
	    success: function(myData){
	    	console.log(JSON.stringify(myData));
	    	if(myData.flag!="T"){
	    		layer.alert(myData.msg);
	    		return;
	    	}
	  	}
	});
}
function addNoticeInfo(){
	$.ajax({
	    type:"post",
	    url:common_submit_url+"?doCode=dymicSql&modelTypes=i_trpNotice",
	    async:false,
	    data:$("#auditInfoForm").serialize(),
	    dataType:"json",
	    success: function(myData){
	    	//console.log(myData);
	    	if(myData.flag!="T"){
	    		layer.alert(myData.msg);
	    		return;
	    	}
	  	}
	});
}

function setDeptIdValue(id,o){
	$("#"+id).val($(o).val());
	$("#searchForm_orgId").val($(o).val());
	
}
function getOrgCname(orgEname){
	var orgCname = "";
	$.ajax({
		url:org_url+"?orgEname="+orgEname,
		type:'get',
		async:false,
		dataType:'json',
		success:function(myData){
			orgCname=myData[0].orgCname;
		}
	});
	return orgCname;
}
function delUser(userId){
	
}
</script>
</html>